package com.open.capacity.controller;

import com.open.capacity.common.model.ActivityModel;
import com.open.capacity.common.web.Result;
import com.open.capacity.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/activity")
public class ActivityController {
    @Autowired
    private ActivityService activityService;

    @GetMapping("/findAll")
    public Object findAll(){
        List<ActivityModel> list=activityService.findAll();
        return Result.succeed(list,"操作成功");
    }
}
